-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for GeometryBasics refactor #4319
base: master
Are you sure you want to change the base?
Conversation
* Update ci.yml * Update Docs.yml * Update reference_tests.yml * add MeshIO branch --------- Co-authored-by: ffreyer <frederic481994@hotmail.de>
…Org/Makie.jl into ff/GeometryBasics_refactor
…Org/Makie.jl into ff/GeometryBasics_refactor
The refactor now makes it easier to work with per-face attributes, so I added an example to the mesh docs: using GeometryBasics
# Reduce quality of sphere
s = Tesselation(Sphere(Point3f(0), 1f0), 12)
ps = coordinates(s)
fs = faces(s)
# Use a FaceView to with a new set of faces which refer to one color per face.
# Each face must have the same length as the respective face in fs.
# (Using the same face type guarantees this)
FT = eltype(fs); N = length(fs)
cs = FaceView(rand(RGBf, N), [FT(i) for i in 1:N])
# generate normals per face (this creates a FaceView as well)
ns = face_normals(ps, fs)
# Create mesh
m = GeometryBasics.mesh(ps, fs, normal = ns, color = cs)
mesh(m) (This still requires vertex duplication, it just happens automatically now.) |
Not really related to GeometryBasics but I didn't want to make another pr in ShaderAbstractions for a 2 line change. |
Compile Times benchmarkNote, that these numbers may fluctuate on the CI servers, so take them with a grain of salt. All benchmark results are based on the mean time and negative percent mean faster than the base branch. Note, that GLMakie + WGLMakie run on an emulated GPU, so the runtime benchmark is much slower. Results are from running: using_time = @ctime using Backend
# Compile time
create_time = @ctime fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @ctime Makie.colorbuffer(display(fig))
# Runtime
create_time = @benchmark fig = scatter(1:4; color=1:4, colormap=:turbo, markersize=20, visible=true)
display_time = @benchmark Makie.colorbuffer(fig)
|
…Org/Makie.jl into ff/GeometryBasics_refactor
|
||
# For correct z-ordering we need to be in view/camera or screen space | ||
model = copy(primitive.model[]) | ||
model = copy(primitive.model[])::Mat4d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems weird to copy an immutable? Not part of this PR, but still we may want to remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may come from my first attempt to get 3D meshes working in CairoMakie where I didn't know what kind of types to expect. I guess technically you could do plot(..., model = rand(4, 4)
and pass a Base.Matrix, but iirc this errored when copy(::Mat4d) was generating a Base.Matrix anyway...
…ding via PNGFiles
Description
Requires:
This is still in prototyping stage as I'm looking what things GeometryBasics is missing/should do.
TODO:
All RPRMakie examples run with JuliaGraphics/RadeonProRender.jl#22 except for:
I'm not familiar enough with RPRMakie to say they look correct with confidence, but most look good to me. I'm not sure what to make of
eat_topographie_sphere.jl
(that's not a sphere?) and "volume.jl", they might be wrong.Test failures:
(:red, 0.5)
, so this seems more correct to me here. I'm just confused why it's different here at allshading of catmesh changed, seams visiblefixedCairoMakie Merged color Mesh changebut that's expected due to updates to vertex orderCairoMakie voxel clipping looks more odd because triangle faces have shifted orientationfixed via Cleanup voxel clipping #4397Issues:
GeometryBasics
such asTetrahedron
#3705 now as far as I can tellType of change
Checklist